package com.example.c1.bytebuffer;

import com.example.util.ByteBufferUtil;

import java.io.FileNotFoundException;
import java.nio.ByteBuffer;

public class TestByteBufferReadWrite {

    public static void main(String[] args) throws FileNotFoundException {
        ByteBuffer buffer = ByteBuffer.allocate(16);
        buffer.put((byte) 0x61);
        buffer.put(new byte[]{0x62, 0x63, 0x64, 0x65});
        ByteBufferUtil.debugAll(buffer);
        buffer.flip();
        ByteBufferUtil.debugAll(buffer);
    }
}
